package com.yr.ryjk.ads.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.yr.ryjk.ads.entity.Ads;

public interface AdsMapper {
	int deleteByPrimaryKey(String[] classList);

	int insert(Ads record);

	int insertSelective(Ads record);

	Ads selectByPrimaryKey(String id);

	int updateByPrimaryKeySelective(Ads record);

	int updateByPrimaryKey(Ads record);

	List<Ads> selectOfPage(int i, int pageSize, @Param("type") String type);

	int selectCount(@Param("type") String type);

	@Select("select * from ads where type=#{0} order by add_time desc limit 0,#{1}")
	@ResultMap("BaseResultMap")
	List<Ads> selectOfType(String type, int count);

	@Update("update ads set add_time=#{1} where id=#{0}")
	void updateTime(String id, Long date);
}